#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__

#include "cocos2d.h"

class MainFrame : public cocos2d::Layer
{
public:
    // there's no 'id' in cpp, so we recommend returning the class instance pointer
    static cocos2d::Scene* createScene();

    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init();  
    
    // a selector callback
    void menuCloseCallback(cocos2d::Ref* pSender);
    
    // implement the "static create()" method manually
    CREATE_FUNC(MainFrame);
    
    cocos2d::Sprite *mySprite;
    unsigned int soundInt;
    void StopEffect(float dt);
    
    bool onTouchBegan(cocos2d::Touch *touch, cocos2d::Event *event);
    void onTouchMoved(cocos2d::Touch *touch, cocos2d::Event *event);
    void onTouchEnded(cocos2d::Touch *touch, cocos2d::Event *event);
    
    void onTouchesBegan(const std::vector<cocos2d::Touch *> &touches, cocos2d::Event *event);
//    void onTouchesMoved(const std::vector<cocos2d::Touch *> &touches, cocos2d::Event *event);
//    void onTouchesEnded(const std::vector<cocos2d::Touch *> &touches, cocos2d::Event *event);
private:
    cocos2d::PhysicsWorld *gameEngine;
    void SetPhysicEngine(cocos2d::PhysicsWorld *engine)
    {
        gameEngine = engine;
    }
    bool onContactBegin(cocos2d::PhysicsContact &contact);

};

#endif // __MainFrame_SCENE_H__
